Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Exclude deprecated insights fields for v19.0 and above #209

Closed
wants to merge 6 commits into from

Conversation

spencerjbeckwith
Copy link
Contributor

Some insights fields were deprecated in API Version 19. Running the tap gave me this error:

  Status:  400
  Response:
    {
      "error": {
        "message": "(#100) age_targeting, gender_targeting, labels, location, estimated_ad_recall_rate_lower_bound, estimated_ad_recall_rate_upper_bound, estimated_ad_recallers_lower_bound, estimated_ad_recallers_upper_bound are not valid for fields param after V19.0",
        "type": "OAuthException",
        "code": 100,
        "fbtrace_id": "****"
      }
    }

By adding these fields to the EXCLUDED_FIELDS list I no longer received the error and the tap could complete successfully.

In order to prevent somehow breaking previous integrations, it may be worthwhile to check these specific fields against the configured api_version. I figured that would be overkill to resolve the error, but I'd be happy to contribute that if needed.

@spencerjbeckwith spencerjbeckwith changed the title Exclude deprecated insights fields for v19.0 and above fix: Exclude deprecated insights fields for v19.0 and above Jun 12, 2024
@edgarrmondragon
Copy link
Member

Should we also update the default version to v19.0 in tap.py?

@guillaumemeyer
Copy link

@spencerjbeckwith I was facing this issue and manually patched ad_insights.py with the suggested fields exclusion and it works.
This merge is definitely needed.

@edgarrmondragon v19 looks like a good new default version

@edgarrmondragon
Copy link
Member

Superseded by #262

@edgarrmondragon
Copy link
Member

Thanks @spencerjbeckwith!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants